package cn.aitrox.ry.service.auth.api;

import cn.aitrox.ry.bean.CommonPageInfo;
import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.service.auth.dto.permission.in.AuthPermissionCreateInDto;
import cn.aitrox.ry.service.auth.dto.permission.in.AuthPermissionSearchInDto;
import cn.aitrox.ry.service.auth.dto.permission.in.AuthPermissionUpdateInDto;
import cn.aitrox.ry.service.auth.dto.permission.out.AuthPermissionDetailDto;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface AuthPermissionApi {

    @PostMapping(value = "/auth/permission")
    RespResult<Integer> create(@RequestBody AuthPermissionCreateInDto input);

    @PutMapping(value = "/auth/permission")
    RespResult update(@RequestBody AuthPermissionUpdateInDto input);

    @GetMapping(value = "/auth/permission/{id}")
    RespResult<AuthPermissionDetailDto> read(@PathVariable("id") Integer id);

    @DeleteMapping(value = "/auth/permission/{id}")
    RespResult delete(@PathVariable("id") Integer id);

    @PostMapping(value = "/auth/permission/search")
    CommonPageInfo<AuthPermissionDetailDto> search(@RequestBody AuthPermissionSearchInDto input);
}
